/*
 * V4L2 video capture example
 * AUTHOT : TAIIC
 * DATA : 2023-09-05
 */
#include "taiic_rkisp.h"



int main(int argc, char **argv)
{
    taiic_rkisp_s *main_ctx;

    main_ctx = reinterpret_cast<taiic_rkisp_s *>(malloc(sizeof(taiic_rkisp_s))); //向系统申请内存空间的函数
    memset(main_ctx, 0, sizeof(taiic_rkisp_s));
    init_rkisp_ctx(main_ctx);

    init_rkisp_routine(main_ctx);


    init_device(main_ctx);
    printf("===This is line %d in the file===\n",__LINE__);
    start_capturing(main_ctx);
    printf("%s:-------- stream on mipi tx/rx -------------\n", get_sensor_name(main_ctx));



    while (main_ctx->frame_count == -1 && main_ctx->outputCnt > 0) 
    {
        read_frame(main_ctx);   
        
         
    }

    stop_capturing(main_ctx);

    deinit_rkisp(main_ctx);

    uninit_device(main_ctx);
    close_device(main_ctx);


    return 0;
}

